import request from './http';
import {Files} from "@/types/entity";

/**
 * 文件系统 前端接口
 */
export default class FilesApi {
  static page(data: Files) {
    let { index, size, ...vo } = data;
    return request.post(`/files/page/${index}/${size}`, vo);
  }

  static save(data: Files) {
    return request.post<Files>('/files', data);
  }

  static update(data: Files) {
    return request.put<Files>('/files', data);
  }

  static delete(ids: number[]) {
    return request.post('/files/delete', ids);
  }

  static list(data: Files) {
    return request.post('/files/list', data);
  }

  static getById(id: number) {
    return request.get(`/files/get/${id}`);
  }


}
